package com.TLLT.QADMobileItemEnquiry;

public class LoginControler {
    public static boolean logedin=false;
    public static String userS="";
    public static String passS="";
    public static int currentTab=0;
    public static String message="";
    
    public static String login(String user,String password){
    	userS=user;
		passS=password;
		message="";
		String rez="";
		try{
		  rez=DataExchangeControler.checkUser(user, password);
    	if (rez.equals("true")){
    		logedin=true;
    	}else{ if  (rez.contains("timed") || rez.contains("failed"))  {
    	     	rez="Connection timed out!";
    	    	message=rez;	
    	       }
            logedin=false;
    		}
		}catch(Exception ex){rez="Connection timed out!";message=rez; logedin=false;}
    	return rez;
    }
}
